<?php require_once '../web.php'; ?>
<!DOCTYPE html>
<html>
    <head>
        <title>Agent Login</title>
        <meta charset="utf-8" />
        <link href="<?php echo LODE_SERVER; ?>/View/css/style.css" rel="stylesheet" />
        <link href="<?php echo LODE_SERVER; ?>/View/css/jquery-ui/jquery-ui.min.css" rel="stylesheet" />
        <link href="<?php echo LODE_SERVER; ?>/View/css/style-document-home.css" rel="stylesheet" />
        <script src="<?php echo LODE_SERVER; ?>/View/js/lib/jquery.min.js"></script>
        <script src="<?php echo LODE_SERVER; ?>/View/js/lib/jquery.ui.min.js"></script>
        <script src="<?php echo LODE_SERVER; ?>/View/js/methods.js"></script>
    </head>
    <body>
        <style>
            body {
                background: none no-repeat fixed 0 0 #3e3f41;
                background-size: 100% 100%;
            }
        </style>
        <div id="loginPopup" title="Login">
            <form method="POST" action="<?php echo LODE_SERVER; ?>/View/login.php" id="frmlogin">
                <div>
                    <label for="name">Username</label><input type="text" name="username">
                </div>
                <div>
                    <label for="password">Password</label><input type="password" name="password">
                </div>
                <label id="msg" style="text-align: center;text-transform: none;color: red;height: 20px; padding-left: 60px">
                    <?php
                    $msg = (isset($_GET['msg'])) ? $_GET['msg'] : '';
                    if ($msg == 'Y')
                        echo 'Người dùng này đã bị khóa';
                    else if ($msg == 'S')
                        echo 'Tên người dùng hoặc mật khẩu sai !';
                    else
                        echo '';
                    ?>
                </label>
                <div class="button-panel clear right">
                    <input type="hidden" value="LOGINAGENT" name="action">
                    <input type="submit" value="Login" class="button-popup">
                    <input type="reset" value="Reset" class="button-popup">
                </div>
            </form>
        </div>

        <script>
            $("#loginPopup").dialog({
                autoOpen: false,
                height: 270,
                width: 360,
                modal: true
            });
            $("#loginPopup").dialog("open");
        </script>
    </div>
</body>
</html>